export interface ILanhuJsonRes {
    flow:          boolean;
    url_md5:       string;
    isMergeData:   boolean;
    md5:           string;
    json_md5:      string;
    type:          string;
    ArtboardID:    string;
    plVersion:     string;
    sketchVersion: SketchVersion;
    device:        string;
    ArtboardScale: number;
    info:          Info[];
    sliceScale:    number;
    skBuild:       number;
    exportScale:   number;
    pluginVersion: string;
    sketchtool:    number;
    skVersion:     number;
    flowData:      any[];
    pageName:      string;
}

export interface Info {
    id:                                 string;
    includeBackgroundColorInExport?:    boolean;
    top:                                number;
    left:                               number;
    fills?:                             Fill[];
    name:                               string;
    height:                             number;
    ddsType?:                           DdsType;
    hasBackgroundColor?:                boolean;
    position_x?:                        number;
    index:                              number | string;
    position_y?:                        number;
    width:                              number;
    layers:                             any[];
    hasExportDDSImage?:                 boolean;
    isFlippedHorizontal?:               boolean;
    hasFixedLeft?:                      boolean;
    isFlippedVertical?:                 boolean;
    isVisible?:                         boolean;
    influenceHeight?:                   number;
    booleanOperation?:                  number;
    borderOptions?:                     BorderOptions;
    hasFixedWidth?:                     boolean;
    type?:                              InfoType;
    ddsOriginFrame?:                    OriginFrame;
    hasFixedBottom?:                    boolean;
    blendMode?:                         number;
    hasClippingMask?:                   number;
    rotation?:                          number;
    opacity?:                           number;
    startMarkerType?:                   number;
    hasFixedRight?:                     boolean;
    exportable?:                        boolean;
    windingRule?:                       number;
    hasFixedTop?:                       boolean;
    ddsImage?:                          DdsImage;
    isAutolayout?:                      boolean;
    miterLimit?:                        number;
    influenceWidth?:                    number;
    layerOriginFrame?:                  OriginFrame;
    pointRadiusBehaviour?:              number;
    parentID?:                          string;
    endMarkerType?:                     number;
    shouldBreakMaskChain?:              boolean;
    hasFixedHeight?:                    boolean;
    influenceLeft?:                     number;
    sharedStyleID?:                     string;
    isCopy?:                            boolean;
    influenceTop?:                      number;
    clippingMaskMode?:                  number;
    edited?:                            boolean;
    points?:                            Point[];
    isLocked?:                          boolean;
    isClosed?:                          boolean;
    borders?:                           Border[];
    shadow?:                            Shadow[];
    radius?:                            number[];
    blur?:                              Blur;
    backgroundColor?:                   Color;
    image?:                             Image;
    fillColor?:                         Color;
    dontSynchroniseWithSymbol?:         boolean;
    kerning?:                           number;
    lineSpacingBehaviour?:              number;
    automaticallyDrawOnUnderlyingPath?: boolean;
    characterSpacing?:                  number;
    textBehaviour?:                     number;
    font?:                              FontClass;
    ddsAdaptiveFrame?:                  DdsAdaptiveFrame;
    dash?:                              number[];
    colorControls?:                     ColorControls;

    area?:                              number;
    naturalWidth?:                      number;
    naturalHeight?:                     number;
}

export interface Color {
    a:     number;
    b:     number;
    value: string;
    g:     number;
    r:     number;
}

export interface Blur {
    radius:      number;
    center:      Center;
    blurType:    number;
    type:        BlurType;
    saturation:  number;
    isEnabled:   boolean;
    motionAngle: number;
}

export interface Center {
    x?: number;
    y?: number;
}

export enum BlurType {
    高斯模糊 = "高斯模糊",
}

export interface BorderOptions {
    dashPattern:   string[];
    lineCapStyle:  number;
    lineJoinStyle: number;
    isEnabled:     boolean;
}

export interface Border {
    position:  Position;
    type:      BorderType;
    blendMode: number;
    opacity:   number;
    color?:    Color;
    thickness: number;
    isEnabled: boolean;
    fillType:  number;
    gradient?: Gradient;
}

export interface Gradient {
    colorStops:   ColorStop[];
    type:         GradientType;
    gradientType: number;
    to:           Center;
    elipseLength: number;
    from:         Center;
}

export interface ColorStop {
    position: number;
    color:    Color;
}

export enum GradientType {
    Linear = "linear",
    Radial = "radial",
}

export enum Position {
    中心边框 = "中心边框",
    内边框 = "内边框",
    外边框 = "外边框",
}

export enum BorderType {
    Color = "color",
    Gradient = "gradient",
}

export interface ColorControls {
    hue:        number;
    contrast:   number;
    saturation: number;
    isEnabled:  boolean;
    brightness: number;
}

export interface DdsAdaptiveFrame {
    top:    number;
    left:   number;
    height: number;
    width:  number;
}

export interface DdsImage {
    isNew:    number;
    size:     Size;
    imageUrl: string;
    point:    Center;
}

export interface Size {
    height: number;
    width:  number;
}

export interface OriginFrame {
    height: number;
    x:      number;
    y:      number;
    width:  number;
}

export enum DdsType {
    ArtboardGroup = "artboard-group",
    Oval = "oval",
    Rectangle = "rectangle",
    ShapeGroup = "shape-group",
    Star = "star",
    Triangle = "triangle",
}

export interface Fill {
    type:              BorderType;
    color?:            Color;
    gradient?:         Gradient;
    patternTileScale?: number;
    noiseIntensity?:   number;
    blendMode?:        number;
    noiseIndex?:       number;
    opacity?:          number;
    patternFillType?:  number;
    isEnabled?:        boolean;
    fillType?:         number;
}

export interface FontClass {
    align:             Align;
    kerning:           number;
    line:              number;
    size:              number;
    verticalAlignment: number;
    styles:            Style[];
    color:             Color;
    displayName:       DisplayName;
    content:           string;
    textAlignment:     number;
    spacing:           number;
    font:              FontEnum;
}

export enum Align {
    Center = "center",
    Left = "left",
    Right = "right",
}

export enum DisplayName {
    苹方简中黑体 = "苹方-简 中黑体",
    苹方简常规体 = "苹方-简 常规体",
    造字工房黄金时代简约体 = "造字工房黄金时代简约体",
}

export enum FontEnum {
    MFTheGoldenEraJianYueRegular = "MFTheGoldenEraJianYue-Regular",
    PingFangSCMedium = "PingFangSC-Medium",
    PingFangSCRegular = "PingFangSC-Regular",
}

export interface Style {
    tailIndent:                    number;
    baseWritingDirection:          number;
    line:                          number;
    location:                      string;
    minimumLineHeight:             number;
    length:                        string;
    size:                          string;
    color:                         Color;
    lineHeightMultiple:            number;
    defaultTabInterval:            number;
    firstLineHeadIndent:           number;
    hyphenationFactor:             number;
    lineBreakMode:                 number;
    paragraphSpacing:              string;
    kern:                          number;
    alignment:                     number;
    maximumLineHeight:             number;
    displayName:                   DisplayName;
    content:                       string;
    headerLevel:                   number;
    lineSpacing:                   number;
    headIndent:                    number;
    tighteningFactorForTruncation: boolean;
    spacing:                       string;
    font:                          FontEnum;
    decorationLine:                DecorationLine;
    paragraphSpacingBefore:        number;
}

export enum DecorationLine {
    None = "none",
}

export interface Image {
    isNew:    number;
    size:     Size;
    imageUrl: string;
    point:    Center;
    svgUrl?:  string;
}

export interface Point {
    hasCurveTo:   boolean;
    curveTo:      Center;
    curveMode:    number;
    hasCurveFrom: boolean;
    curveFrom:    Center;
    cornerRadius: number;
    point:        Center;
}

export interface Shadow {
    blurRadius: number;
    offsetX:    number;
    offsetY:    number;
    type:       ShadowType;
    blendMode:  number;
    opacity:    number;
    color:      Color;
    isEnabled:  boolean;
    spread:     number;
}

export enum ShadowType {
    内阴影 = "内阴影",
    外阴影 = "外阴影",
}

export enum InfoType {
    Bitmap = "bitmap",
    LayerGroup = "layer-group",
    Shape = "shape",
    Slice = "slice",
    Text = "text",
}

export interface SketchVersion {
}
